<%-- 
    Document   : index
    Created on : 2009-3-25, 15:31:04
    Author     : g.huangjx
--%>

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld"%>
<%
String sortType="1";
if(request.getParameter("sortType")!=null&&!request.getParameter("sortType").equals("")){
	sortType=request.getParameter("sortType");
}
String type="";
if(request.getParameter("type")!=null&&!request.getParameter("type").equals("")){
	type=request.getParameter("type");
}
String module="";
if(request.getParameter("module")!=null&&!request.getParameter("module").equals("")){
	module=request.getParameter("module");
}
String orgType="";
if(request.getParameter("orgType")!=null&&!request.getParameter("orgType").equals("")){
	module=request.getParameter("orgType");
}
String superId="0";
if(request.getParameter("superId")!=null&&!request.getParameter("superId").equals("")){
	superId=request.getParameter("superId");
}
 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<base target="_self" />
<title>组织结构树</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="<s:url value="/xtreecheckbox/js/xtree.js"/>"></script>

<link type="text/css" rel="stylesheet" href="<s:url value="/xtreecheckbox/xtree.css"/>" />

<script language="javascript">

function getSel(){
	var myValue= atree.getSelectIds();
	var arr=new Array();
	arr[0]=myValue.id;
	arr[1]=myValue.name;
	window.returnValue=arr;
	if(myValue.id==""){
		if(!confirm("未选择组织，是否要清空原来的组织?")){
			return;
		}
	}
	window.close();
}
function showPerson(organId){
	alert(organId);
}

</script>
</head>
<body style="background:#CCCCCC;font-size:9pt" >
<button onclick="getSel();">确定</button>&nbsp;
<button onclick="window.close();">关闭</button>&nbsp;

<script type="text/javascript">
/// XP Look
webFXTreeConfig.rootIcon		= "<s:url value="/xtreecheckbox/images/xp/folder.png"/>";
webFXTreeConfig.openRootIcon	= "<s:url value="/xtreecheckbox/images/xp/openfolder.png"/>";
webFXTreeConfig.folderIcon		= "<s:url value="/xtreecheckbox/images/xp/folder.png"/>";
webFXTreeConfig.openFolderIcon	= "<s:url value="/xtreecheckbox/images/xp/openfolder.png"/>";
webFXTreeConfig.fileIcon		= "<s:url value="/xtreecheckbox/images/xp/file.png"/>";
webFXTreeConfig.lMinusIcon		= "<s:url value="/xtreecheckbox/images/xp/Lminus.png"/>";
webFXTreeConfig.lPlusIcon		= "<s:url value="/xtreecheckbox/images/xp/Lplus.png"/>";
webFXTreeConfig.tMinusIcon		= "<s:url value="/xtreecheckbox/images/xp/Tminus.png"/>";
webFXTreeConfig.tPlusIcon		= "<s:url value="/xtreecheckbox/images/xp/Tplus.png"/>";
webFXTreeConfig.iIcon			= "<s:url value="/xtreecheckbox/images/xp/I.png"/>";
webFXTreeConfig.lIcon			= "<s:url value="/xtreecheckbox/images/xp/L.png"/>";
webFXTreeConfig.tIcon			= "<s:url value="/xtreecheckbox/images/xp/T.png"/>";
webFXTreeConfig.blankIcon		= "<s:url value="/xtreecheckbox/images/xp/blank.png"/>";
var atree = new WebFXLoadTree("组织树","<s:url value='/' escapeAmp='false'/>"+"/organ/treeOrgan.action?conds.superior=<%=superId%>&orgType=<%=orgType%>&type=<%=type%>&module=<%=module%>&date=<%=System.currentTimeMillis()%>");
document.write(atree);
</script>

</body>
</html>
